/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package py.una.pol.ii.is2.domain.flota;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author markos
 */
@Embeddable
public class VehiculoPlantillaPK implements Serializable {
    private static final long serialVersionUID = 2697778748072025557L;
    @Basic(optional = false)
    @Column(name = "vepl_vehiculo")
    private int veplVehiculo;
    @Basic(optional = false)
    @Column(name = "vepl_plantilla")
    private int veplPlantilla;

    public VehiculoPlantillaPK() {
    }

    public VehiculoPlantillaPK(int veplVehiculo, int veplPlantilla) {
        this.veplVehiculo = veplVehiculo;
        this.veplPlantilla = veplPlantilla;
    }

    public int getVeplVehiculo() {
        return veplVehiculo;
    }

    public void setVeplVehiculo(int veplVehiculo) {
        this.veplVehiculo = veplVehiculo;
    }

    public int getVeplPlantilla() {
        return veplPlantilla;
    }

    public void setVeplPlantilla(int veplPlantilla) {
        this.veplPlantilla = veplPlantilla;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) veplVehiculo;
        hash += (int) veplPlantilla;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof VehiculoPlantillaPK)) {
            return false;
        }
        VehiculoPlantillaPK other = (VehiculoPlantillaPK) object;
        if (this.veplVehiculo != other.veplVehiculo) {
            return false;
        }
        if (this.veplPlantilla != other.veplPlantilla) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.una.pol.ii.is2.dao.flota.VehiculoPlantillaPK[veplVehiculo=" + veplVehiculo + ", veplPlantilla=" + veplPlantilla + "]";
    }

}
